<?php /*a:6:{s:65:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\post\add.html";i:1660101579;s:63:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\layout.html";i:1659685605;s:68:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\common\meta.html";i:1659584544;s:70:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\common\script.html";i:1659584105;s:70:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\common\header.html";i:1660015203;s:70:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\common\footer.html";i:1659584054;}*/ ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
<title>ask论坛</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="keywords" content="fly,layui,前端社区">
<meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
<link rel="stylesheet" href="/static/home/res/layui/css/layui.css">
<link rel="stylesheet" href="/static/home/res/css/global.css">


    <!-- 引入js -->
    <script src="/static/home/res/layui/layui.js"></script>
<script>
    layui.cache.page = '';
    layui.cache.user = {
        username: '游客'
        , uid: -1
        , avatar: '/static/home/res/images/avatar/00.jpg'
        , experience: 83
        , sex: '男'
    };
    layui.config({
        version: "3.0.0"
        , base: '/static/home/res/mods/' //这里实际使用时，建议改成绝对路径
    }).extend({
        fly: 'index'
    }).use('fly');
</script>
</head>

<body>
    <!-- 公共头部 -->
    <div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="<?php echo url('/'); ?>">
            <img src="/static/home/res/images/logo.png" alt="layui">
        </a>

        <?php if((app('request')->action() !== 'login' && app('request')->action() !== 'register')): ?>
        <ul class="layui-nav fly-nav-user">

            <!-- 未登入的状态 -->
            <?php if((!app('request')->cookie('LoginUser'))): ?>
            <li class="layui-nav-item">
                <a class="iconfont icon-touxiang layui-hide-xs" href="user/login.html"></a>
            </li>
            <li class="layui-nav-item">
                <a href="<?php echo url('/home/index/login'); ?>">登入</a>
            </li>
            <li class="layui-nav-item">
                <a href="<?php echo url('/home/index/register'); ?>">注册</a>
            </li>
            <?php else: ?>

            <!-- 登入后的状态 -->

            <li class="layui-nav-item">
                <a class="fly-nav-avatar" href="javascript:;">
                    <cite class="layui-hide-xs"><?php echo htmlentities($LoginUser['nickname']); ?></cite>
                    <?php if(($LoginUser['auth'] == 1)): ?>
                    <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：<?php echo htmlentities($LoginUser['nickname']); ?>"></i>
                    <?php endif; ?>
                    <i class="layui-badge fly-badge-vip layui-hide-xs">VIP <?php echo htmlentities($LoginUser['vip']); ?></i>
                    <img
                        src="<?php echo !empty($LoginUser['avatar']) ? '/' . $LoginUser['avatar']  :  '/static/home/res/images/avatar/default.png'; ?>">
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="<?php echo url('/home/user/profile'); ?>"><i class="layui-icon">&#xe620;</i>基本资料</a></dd>
                    <dd><a href="user/message.html"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
                    <dd><a href="/home/user"><i class="layui-icon"
                                style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
                    <hr style="margin: 5px 0;">
                    <dd><a href="<?php echo url('home/index/logout'); ?>" style="text-align: center;">退出</a></dd>
                </dl>
            </li>
            <?php endif; ?>
        </ul>
        <?php endif; ?>
    </div>
</div>

    <!-- 输出子内容 -->
    <!-- 引用编辑器 -->
<link rel="stylesheet" href="/static/kindeditor/themes/default/default.css" />
<script src="/static/kindeditor/kindeditor-all.js"></script>
<script src="/static/kindeditor/lang/zh-CN.js"></script>

<div class="layui-container fly-marginTop">
    <div class="fly-panel" pad20 style="padding-top: 5px;">
        <?php if($LoginUser['auth'] == 0): ?>
        <div class="fly-none">没有权限</div>
        <?php else: ?>
        <div class="layui-form layui-form-pane">
            <div class="layui-tab layui-tab-brief" lay-filter="user">
                <ul class="layui-tab-title">
                    <li class="layui-this">发表新帖
                        <!-- 编辑帖子 -->
                    </li>
                </ul>
                <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
                    <div class="layui-tab-item layui-show">
                        <form method="post">
                            <div class="layui-row layui-col-space15 layui-form-item">
                                <div class="layui-col-md3">
                                    <label class="layui-form-label">所属分类</label>
                                    <div class="layui-input-block">
                                        <select lay-verify="required" name="cateid" lay-filter="column">
                                            <option></option>
                                            <?php foreach($CateList as $item): ?>
                                            <option value="<?php echo htmlentities($item['id']); ?>"><?php echo htmlentities($item['name']); ?></option>
                                            <?php endforeach; ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-col-md9">
                                    <label for="L_title" class="layui-form-label">标题</label>
                                    <div class="layui-input-block">
                                        <input type="text" id="L_title" name="title" placeholder="请输入帖子标题" required
                                            lay-verify="required" autocomplete="off" class="layui-input">
                                        <!-- <input type="hidden" name="id" value="{{d.edit.id}}"> -->
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <div class="layui-input-block">
                                    <textarea name="content" style="width:100%;height: 260px;"
                                        placeholder="请输入帖子内容"></textarea>
                                    <!-- <textarea id="L_content" name="content" required lay-verify="required"
                                        placeholder="详细描述" class="layui-textarea fly-editor"
                                        style="height: 260px;"></textarea> -->
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label for="point" class="layui-form-label">悬赏积分</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="point" name="point" required lay-verify="required"
                                        placeholder="请输入悬赏积分" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">帖子状态</label>
                                    <div class="layui-input-inline" style="width: 190px;">
                                        <select name="state">
                                            <option value="0">常规</option>
                                            <?php foreach($StateList as $key => $item): ?>
                                            <option value="<?php echo htmlentities($key); ?>"><?php echo htmlentities($item); ?></option>
                                            <?php endforeach; ?>
                                        </select>
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">发表后无法更改状态</div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label for="L_vercode" class="layui-form-label">验证码</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="L_vercode" name="vercode" required lay-verify="required"
                                        placeholder="请输入验证码" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-form-mid">
                                    <!-- <span style="color: #c00;">1+1=?</span> -->
                                    <span><img src="<?php echo url('/home/index/vercode'); ?>" alt="captcha"
                                            onclick='this.src = `<?php echo url("/home/index/vercode?id="); ?>`+ Math.random()' /></span>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <button class="layui-btn" lay-submit>立即发布</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <?php endif; ?>
    </div>
</div>

<script>
    KindEditor.ready(function (K) {
        var editor1 = K.create('textarea[name="content"]');
    })
</script>

    <!-- 底部 -->
    <div class="fly-footer">
    <p>2017 &copy; <a href="http://www.layui.com/" target="_blank">Fly技术社区</a></p>
</div>

</body>

</html>